package com.kaikai.servicebase.exceptionhandler;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 自定义异常
 */
@Data
@AllArgsConstructor//有参构造
@NoArgsConstructor//无参构造
public class MyException extends RuntimeException {
    private Integer code;//状态码
    private String msg;//异常信息

    public MyException(String msg) {
        this.code = 20001;
        this.msg = msg;
    }
}